package com.ruirui.demo.strategy.impl;

import com.ruirui.demo.strategy.GradingStrategy;
import com.ruirui.demo.strategy.entity.Answer;
import com.ruirui.demo.strategy.entity.Question;
import org.springframework.stereotype.Component;


/**
 * 简答题测罗
 */
@Component
public class EssayStrategy implements GradingStrategy {
    @Override
    public int grade(Question question, Answer answer) {
        return answer.getManualScore()
                != null ? answer.getManualScore() : 0;
    }
}
